﻿<!DOCTYPE html>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title>龙岗中医院大屏-护理系统</title>
	<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
	<link href="../static/tv/css/style.css" th:href="@{/tv/css/style.css}" rel="stylesheet"/>
</head>
<body>
	<div class="head clearfix">
	<h1 class="">龙岗中医院全院住院病区监控</h1>
		<div class="time" id="showTime">2018/6/12 17:00:12</div>
	</div>
	<div class="mainbox">
	
	<ul class="clearfix nav1">
		<li style="width: 30%">
			<div class="box">
				<div class="tit"><span>各级护理占比</span><p></p></div>
				<div class="boxnav" >
					<ul class="jbgc">

						<li style="width:100%;height: 320px" id="echart8"></li>
					</ul>
				</div>
			</div>
		</li>
		<li style="width: 70%">
		<div class="box">
			<div class="tit"><span>全院今日概况总览</span><p></p></div>
			<div class="boxnav" style="height: 320px;">
				<ul class="drqk clearfix">
				<li>
					<div class="icon"><img th:src="@{/img/images/icona.png}"></div>
					<div><span>新入院患者数</span>
					<p><em><a href="javascript:;" onclick="showTableDetail2('IDX_HIS_AT_XRYRC','[新入院患者数]科室详情')" id="IDX_HIS_AT_XRYRC"></a></em><i>人</i></p></div>
					</li>
				<li><div class="icon"><img th:src="@{/img/images/icona.png}"></div>
					<div><span>手术患者数</span>
					<p><em><a href="javascript:;" onclick="showTableDetail2('IDX_YHWS_SSHZS','[手术患者数]科室详情')" id="IDX_YHWS_SSHZS"></a></em><i>人</i></p></div></li>
				<li><div class="icon"><img th:src="@{/img/images/iconc.png}"></div>
					<div><span>病危人数</span>
					<p><em><a href="javascript:;" onclick="showTableDetail2('IDX_YHWS_BWRS','[病危人数]科室详情')" id="IDX_YHWS_BWRS"></a></em><i>人</i></p></div></li>
				<li><div class="icon"><img th:src="@{/img/images/icond.png}"></div>
					<div><span>病重人数</span>
					<p><em><a href="javascript:;" onclick="showTableDetail2('IDX_YHWS_BZRS','[病重人数]科室详情')" id="IDX_YHWS_BZRS"></a></em><i>人</i></p></div></li>
				<li><div class="icon"><img th:src="@{/img/images/icone.png}"></div>
					<div><span>压疮人数</span>
					<p><em><a href="javascript:;" onclick="showTableDetail2('IDX_YHWS_YCRS','[压疮人数]科室详情')" id="IDX_YHWS_YCRS"></a></em><i>人</i></p></div></li>
				<li><div class="icon"><img th:src="@{/img/images/iconf.png}"></div>
					<div><span>跌倒坠床人数</span>
					<p><em><a href="javascript:;" onclick="showTableDetai2('IDX_YHWS_DDZCRS','[跌倒坠床人数]科室详情')" id="IDX_YHWS_DDZCRS"></a></em><i>人</i></p></div></li>
				<li><div class="icon"><img th:src="@{/img/images/icond.png}"></div>
					<div><span>BADL高位人数</span>
						<p><em><a href="javascript:;" onclick="showTableDetail2('IDX_YHWS_BADLGWRS','[BADL高位人数]科室详情')" id="IDX_YHWS_BADLGWRS"></a></em><i>人</i></p></div></li>
				<li><div class="icon"><img th:src="@{/img/images/icone.png}"></div>
					<div><span>营养不良人数</span>
						<p><em><a href="javascript:;" onclick="showTableDetail2('IDX_YHWS_YYBLRS','[营养不良人数]科室详情')" id="IDX_YHWS_YYBLRS"></a></em><i>人</i></p></div></li>
				<li><div class="icon"><img th:src="@{/img/images/iconf.png}"></div>
					<div><span>Caprin高危人数</span>
						<p><em><a href="javascript:;" onclick="showTableDetail2('IDX_YHWS_CAPRINGWRS','[Caprin高危人数]科室详情')" id="IDX_YHWS_CAPRINGWRS"></a></em><i>人</i></p></div></li>
				</ul>
			</div>
			</div>
		</li>
		<li style="width: 100%">
			<div class="box">
				<div class="tit"><span>全院护理敏感指标数据预览</span><p></p></div>
				<div class="boxnav" style="height: 250px;">
					<ul class="jcjg">
						<li><h3></h3>
							<div class="jcnav">
								<img th:src="@{/img/images/icon1.png}">
								<div class="jcnavp">
									<div class="fora"><ol>医源性皮肤损伤发生例次</ol><span>765</span><i class="text-d">+2.30</i><div class="forb"></div></div>
									<div class="fora"><ol>给药错误发生例次</ol><span>765</span><i class="text-d">+2.30</i><div class="forb"></div></div>
								</div>
							</div>
						</li>
						<li><h3></h3>
							<div class="jcnav">
								<img th:src="@{/img/images/icon2.png}">
								<div class="jcnavp">
									<div class="fora"><ol>床护比</ol><span>1:1.06</span><div class="forb"></div></div>
									<div class="fora"><ol>护患比</ol><span><a href="javascript:;" onclick="showTableDetail2('ID','护患比详情')">1:1.2</a></span><div class="forb"></div></div>
								</div>

							</div>
						</li>
						<li><h3></h3>
							<div class="jcnav jcnav2">
								<img th:src="@{/img/images/icon3.png}">
								<div class="jcnavp">
									<div class="fora"><ol>插管患者非计划拔管发生率</ol><span>765</span><i class="text-d">+2.30</i><div class="forb"></div></div>
									<div class="fora"><ol>住院患者跌倒发生率</ol><span>765</span><i class="text-d">+2.30</i><div class="forb"></div></div>
									<div class="fora"><ol>住院患者身体约束率</ol><span>765</span><i class="text-d">+2.30</i><div class="forb"></div></div>
									<div class="fora"><ol>院内压疮发生率</ol><span>765</span><i class="text-d">+2.30</i><div class="forb"></div></div>
								</div>
							</div>
						</li>
					</ul>

				</div>
			</div>
		</li>
		</ul>
	</div>
</body>
<script src="../static/tv/js/jquery.js" th:src="@{/tv/js/jquery.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
<script th:src="@{/ruoyi/js/ry-ui.js}"></script>
<script src="../static/tv/js/echarts.min.js" th:src="@{/tv/js/echarts.min.js}"></script>
<script>
	var colorData = ['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc'];
	var prefix = "/hospital/tv/hl";
	$(function() {
		var hldj_data = {"chartStyleVO":{"chartType":"pie","chartXVO":{"fieldName":"NA_DIM_NURSINGLEVEL"},"chartYVOList":[{"fieldName":"IDX_HL_HLHZS","formatter":"人次"}]},
			"queryParamVO":{"startDate":"2020-01-01","endDate":"2020-01-01","dimVOList":[{"idPubfld":"ID_DIM_NURSINGLEVEL"}],"idIndexs":["IDX_HL_HLHZS"],"dateType":"D"}};
		$.ajax({
			url: '/hdw/qry/chart/baseQry',
			type: 'post',
			dataType: 'json',
			contentType: 'application/json;charset=UTF-8',
			data:JSON.stringify(hldj_data),
			success: function (result) {
				if(result.code==0) {
					var data = eval('(' + result.data + ')');
					var shapeType = data.shapeType;
					var echartsInstance=echarts.init(document.getElementById('echart8'));
					echartsInstance.setOption(option);
				}
			}
		});
	});
	function showTableDetail(idIndex,naIndex) {
		$.ajax({
			type: "POST",
			url:"/hdw/qry/chart/dm/t_table",
			data: JSON.stringify({"chartStyleVO":{},"queryParamVO":{"startDate":"20221201","dimVOList":[{"idPubfld":"ID_DIM_DEPTNUR"}],"idIndexs":["IDX_HIS_AT_XRYRC"],"dateType":"D"},"dwQueryVO":{}}),
			dataType: 'html',
			contentType: 'application/json;charset=UTF-8',
			success: function(res) {
				layer.open({
					type: 1,
					area: ["1024px", "600px"],
					title: "["+naIndex+"]详情 20221201",
					content: res,
					btn: ['确定', '关闭'],
					yes: function (index, layero) {
						// 调用子页面（弹出框）的doSubmit方法并获取其返回值
						var context = layero.find('page').context;
						var data = context.defaultView.doSubmit();
					},
					cancel: function (layer_window) {
						// 关闭弹出框页面
						layer.close(layer_window);
					}
				});
			},
			error: function (res) {
				alert("error");
			}
		});
	}

	function showTableDetail2(idIndex,naIndex) {
		$.ajax({
			type: "POST",
			url:"/hdw/qry/chart/dm/t_tableWithDt",
			data: JSON.stringify({"chartStyleVO":{},"queryParamVO":{"startDate":"20230130","dimVOList":[{"idPubfld":"ID_DIM_DEPTNUR"}],"idIndexs":[idIndex],"dateType":"D"},"dwQueryVO":{"fieldList":["NA_DIM_PATIENT","NA_DIM_DEPT_HIS","NA_DIM_DEPTNUR","ID_DIM_TIME_OCCUR"],"startDay":"20221201","whereSql":"","tableName":"dw_his_now_zy_brry"}}),
			dataType: 'html',
			contentType: 'application/json;charset=UTF-8',
			success: function(res) {
				layer.open({
					type: 1,
					area: ["1024px", "600px"],
					title: "["+naIndex+"]详情 20221201",
					content: res,
					btn: ['确定', '关闭'],
					yes: function (index, layero) {
						// 调用子页面（弹出框）的doSubmit方法并获取其返回值
						var context = layero.find('page').context;
						var data = context.defaultView.doSubmit();
					},
					cancel: function (layer_window) {
						// 关闭弹出框页面
						layer.close(layer_window);
					}
				});
			},
			error: function (res) {
				alert("error");
			}
		});
	}

	var t = setTimeout(time,1000);//開始运行
	function time()
	{
		clearTimeout(t);//清除定时器
		dt = new Date();
		var y=dt.getFullYear();
		var mt=dt.getMonth()+1;
		var day=dt.getDate();
		var h=dt.getHours();//获取时
		var m=dt.getMinutes();//获取分
		var s=dt.getSeconds();//获取秒
		document.getElementById("showTime").innerHTML = y+"/"+mt+"/"+day+" "+h+":"+m+":"+s+"";
		if(m%15==0) {
			refresh();
		}
		t = setTimeout(time,1000); //设定定时器，循环运行
	}
	refresh();
	function refresh() {
		$.ajax({
			url:prefix+"/nowIndexData",
			cache: false,
			type: 'GET',
			dataType: 'json',
			success: function (data) {
				if(data.code=="0") {
                    var indexData = data.data;
                    $("#IDX_HIS_AT_XRYRC").html(indexData.IDX_HIS_AT_XRYRC==null?0:indexData.IDX_HIS_AT_XRYRC);$("#IDX_YHWS_BADLGWRS").html(indexData.IDX_YHWS_BADLGWRS);
					$("#IDX_YHWS_CAPRINGWRS").html(indexData.IDX_YHWS_CAPRINGWRS);$("#IDX_YHWS_YYBLRS").html(indexData.IDX_YHWS_YYBLRS);
					$("#IDX_YHWS_DDZCRS").html(indexData.IDX_YHWS_DDZCRS);$("#IDX_YHWS_YCRS").html(indexData.IDX_YHWS_YCRS);$("#IDX_YHWS_BZRS").html(indexData.IDX_YHWS_BZRS);
					$("#IDX_YHWS_BWRS").html(indexData.IDX_YHWS_BWRS);$("#IDX_YHWS_SSHZS").html(indexData.IDX_YHWS_SSHZS);
				}
			}
		});
	}
</script>
</html>
